<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
	<title>MBDS Implementation Reports</title>
	<%= stylesheet_link_tag "styles", "tabs", "tables", "forms"  %>
	<%= javascript_include_tag 'jquery-1.3.2.min' %>
	<%= javascript_include_tag 'jquery-ui-1.7.2.min' %>
	<%= javascript_include_tag 'jquery.floatbox.js' %>
	<%= javascript_include_tag 'language_pop_up.js' %>
	<%= javascript_include_tag 'help_pop_up.js' %>
	 
	<script src="http://openlayers.org/api/OpenLayers.js"></script>
	<%= javascript_include_tag 'openlayers_piecharts_geojson_google_chart.js' %>
	<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAmZWgiWYbJdacYEpt9nIMzhQZ0ZrJ5YjcOZI0VyI_-11Fzva1GhRXdz04IuLloJ1_N271VpLKCUvC_w"></script>
	


	<%= yield :head%>
</head>
<body>

<div id="main"> 
	<div id="header"> 
		<div id="link_to_home">
			<%= link_to image_tag('transparent.gif'), "/home/index" %>
		</div>
		<div id="navmain">	
			
			<div id="rep_title">
			<% if defined? @title%>	 
				<%= @title %>
			<% end %>
			</div>
			
			<div id="nav_menu">
				<ul>
					<li></li>
						<% @tabs.each do |key, title, link| %>
						<% clazz = if defined? @active_tab and !@active_tab.nil? and @active_tab.to_s == key.to_s then "on" else "off" end %>
		                <li class="<%=clazz%>"><%= link_to "<span>#{title}</span>", link %></li>
						<% end %>
					
              	</ul>
			</div>
		
		</div>
		
		<% if logged_in? %>
        
		<div id="usermain">
			<span><a href="#" onclick="showLangPopup()" class="main_link" ><%=_('Language')%></a>
			|
			<span id="logout" >
				<%= link_to _('Logout'), {:controller => '/account', :action => 'logout'}, :class => "main_link", :id =>"logout" %>
			</span></span>
			<div id="user">
				<%= current_user.name %> 
			</div>
			<div id="role">
				<% role_set=Set.new %>
				<% current_user.roles.each do |role| %>
					<% role_set.add(Role.description(role.coordinated_type.constantize)) %>
				<% end %>	
				<%= (role_set.to_a).map { |r| r }.join(" - ")%> 
			
			</div>
		</div>
		<% end %>
		
        <div class="clear"></div>
		
	</div>
</div>

<div id ="content"> 
	<% if flash[:notice] %>
      <div class="notice"><%= flash[:notice] %></div>
    <% end %>
	<% if flash[:error_notice] %>
      	<div class="error_notice"><%= flash[:error_notice] %></div>
    <% end %>
	<%= yield(:content) or yield %>
	<div class="clear"></div>
</div>

<div id="footer">
    <%= yield(:footer)%>
    <div class="clear"></div>
</div>

<div id="support">
	<p><%= _('Feedback and Support:')%> <a href="mailto:mdmsnow@gmail.com">mdmsnow@gmail.com</a></p>
	<p><%= _('Version:')%> <%= get_version rescue nil %></p>
</div>



<div id="logos">
	<%= link_to image_tag("logo_instedd.gif"), 'http://www.instedd.org/' %>
    <%= link_to image_tag("logo_rand.gif"), 'http://www.rand.org/' %>
</div>

<div class="clear"></div>
 
</body>
